/**      
 * @file		ifwhile.cpp
 * @description		This file demonstrates the use of
 *			a while statement, if/else, unary operators
 *			++ and --. There are two flavors of these operators
 *			prefix and postfix versions.
 * @course		CSCI 123 Section 00000
 * @assignment		Sample 10
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
using namespace std;

/**
 * @return zero if the application executes successfully
 */
int main() {
	int passes	= 0;
	int failures	= 0;
	int student	= 1;
	int result	= 0;

	while(student <= 10) {
		cout << "Enter result (1=pass, 2=fail): \n";
		cin >> result;

		if(result == 1) {
			passes++;
		} else {
			failures--;
		}

		student++;	// increase the counter to terminate the while loop
	}

	cout << "Passes: " << passes << " Failures: ";
	cout << failures << endl;
	cout << "Unary Operators" << endl;
	cout << "Passes is incremented with the var(++) operator " << endl;
	cout << "Failures is decremented with the var(--) operator " << endl;
	
	if(passes > 8) {
		cout << "Raise Tuition\n";
	}

	return 0;
}
